// utils/system.js
export const getSystemInfo = () => {
	const sys = uni.getSystemInfoSync()

	// 状态栏高度
	sys.statusBarHeight = sys.statusBarHeight || 0

	// 导航栏高度
	sys.navBarHeight = 44 // 默认值

	// 微信小程序
	#ifdef MP - WEIXIN
	const menu = wx.getMenuButtonBoundingClientRect()
	sys.navBarHeight = menu.bottom + menu.top - sys.statusBarHeight
	#endif

	// 计算可用高度
	sys.contentHeight = sys.windowHeight - sys.statusBarHeight - sys.navBarHeight

	return sys
}